import { IsEnum, IsNotEmpty } from 'class-validator';

export class LoginDto {
  @IsNotEmpty({
    message: '用户名不能为空',
  })
  username: string;

  @IsNotEmpty({
    message: '密码不能为空',
  })
  password: string;

  @IsEnum([0, 1], {
    message: 'isAdmin 必须是 0 或 1',
  })
  isAdmin: 0 | 1;
}
